<?php if (!defined('BASEPATH')) exit('No direct script access allowed'); ?>

<div id="center-wrap" class="ui-corner-tl ui-corner-tr">
	<div id="navigation" class="ui-corner-all"><ul><?php echo $navigator;?></ul></div>
	
	<div class="clrboth"></div>
	<?php 
		$ci=& get_instance();
		$USER = $ci->user_entity->init('id', $_SESSION['user']['id']);
	?>
	<div class="row">
		<div class="column grid_9">
			<p class="bold"> &raquo; Preview show:</p>
		</div>
		<div class="clrboth"></div>
		<div class="column grid_9">
			<div class="column grid_2">Show Reference Number:</div>
			<div class="column grid_4">
				<?php echo $_SESSION['show']['ref_no'];?>
			</div>
			
			<div class="clrboth"></div>
			
			<div class="column grid_2">Show Name:</div>
			<div class="column grid_4">
				<?php echo $_SESSION['show']['name'];?>
			</div>
			
			<div class="clrboth"></div>
			
			<div class="column grid_2">Show type:</div>
			<div class="column grid_4">
				<?php $array = showTypeDataConfig(); echo $array[$_SESSION['show']['show_type']];?>
			</div>
			
			<div class="clrboth"></div>
			
			<div class="column grid_2">Duration of show:</div>
			<div class="column grid_4">
				<?php $array = durationOfShowDataConfig(); echo $array[$_SESSION['show']['show_duration'] ];?>
			</div>
			
			<div class="clrboth"></div>
			
			<div class="column grid_2">Artist:</div>
			<div class="column grid_4">
				<?php echo $_SESSION['show']['artist'];?>
			</div>
			
			<div class="clrboth"></div>
			
			<div class="column grid_2">Country of origin:</div>
			<div class="column grid_4">
				<?php $array = countryOriginDataConfig(); echo $array[$_SESSION['show']['country_origin_code']];?>	
			</div>
			
			<div class="clrboth"></div>
			<div class="column grid_2">Bid Open To:</div>
			<div class="column grid_6">
				<?php 
					$bid_open_array = array();
					$array = bidOpenToDataConfig();
					foreach(explode(',',$_SESSION['show']['bid_type'] ) as $type){
						$bid_open_array[] = $array[$type] ;
					}
					echo implode(', ',$bid_open_array);
				?>
			</div>
			
			<div class="clrboth"></div>
			
			<div class="column grid_2">Music Genre:</div>
			<div class="column grid_6">
				<?php 
					$music_genre = array();
					$array = musicGenreDataConfig();
					foreach(explode(',',$_SESSION['show']['music_genre']) as $genre){
						if($genre){
							$music_genre[] = $array[$genre] ;
						}
					}
					echo implode(', ',$music_genre);
				?>
			</div>
			
			<div class="clrboth"></div>
			<div class="column grid_2">Speaker Profile:</div>
			<div class="column grid_6">
				<?php 
					$speaker_profile = array();
					$array = speakerProfileDataConfig();
					foreach(explode(',',$_SESSION['show']['speaker_profile']) as $profile){
						if($profile){
							$speaker_profile[] = $array[$profile] ;
						}
					}
					echo implode(', ',$speaker_profile);
				?>
			</div>
			
			<div class="clrboth"></div>
			<div class="column grid_2">Plays & Musicals:</div>
			<div class="column grid_6">
				<?php 
					$play_musical = array();
					$array = playsMusicalsDataConfig();
					foreach(explode(',',$_SESSION['show']['plays_musicals']) as $p_m){
						if($p_m){
							$play_musical[] = $array[$p_m] ;
						}	
					}
					echo implode(', ',$play_musical);
				?>
			</div>
			
			<div class="clrboth"></div>
			
			<div class="column grid_2">Booking available for:</div>
			<div class="column grid_6">
				<?php 
					$available_for = array();
					$array = countryZoneDataConfig();
					foreach(explode(',',$_SESSION['show']['available_for']) as $availability){
						$available_for[] = $array[$availability] ;
					}
					echo implode(', ',$available_for);
				?>
			</div>
			<div class="clrboth"></div>
			
			<div class="column grid_2">Period of Travel:</div>
			<div class="column grid_6">
				<?php echo sbxDateFormat($_SESSION['show']['start_date'],'d/M/Y')." - ".sbxDateFormat($_SESSION['show']['end_date'],'d/M/Y');?> 
			</div>
			
			<div class="clrboth"></div>
			
			<div class="column grid_2">Bid Due Date:</div>
			<div class="column grid_6">
				<?php echo sbxDateFormat($_SESSION['show']['bid_due_date'],'d/M/Y');?> 
			</div>
			
			<div class="clrboth"></div>
			
			<div class="column grid_2">Entourage Number:</div>
			<div class="column grid_4">
				<?php echo $_SESSION['show']['entourage_no'];?>  PAX
			</div>
			
			<div class="clrboth"></div>
			
			<div class="column grid_2">Min Bid:</div>
			<div class="column grid_4">
				<?php echo $_SESSION['show']['min_bid'];?> USD
			</div>
			
			<div class="clrboth"></div>
			
			<div class="column grid_2">Air Travel:</div>
			<div class="column grid_4">
				<?php $array = coBuyerOrSellerDataConfig(); echo $array[$_SESSION['show']['air_travel']];?>
			</div>
			
			<div class="clrboth"></div>
			
			<div class="column grid_2">Ground:</div>
			<div class="column grid_4">
				<?php $array = coBuyerOrSellerDataConfig(); echo $array[$_SESSION['show']['ground']];?>
			</div>
			
			<div class="clrboth"></div>
			
			<div class="column grid_2">Hotel:</div>
			<div class="column grid_4">
				<?php $array = coBuyerOrSellerDataConfig(); echo $array[$_SESSION['show']['hotel']];?>
			</div>
			
			<div class="clrboth"></div>
			
			<div class="column grid_2">Per diem:</div>
			<div class="column grid_4">
				<?php $array = coBuyerOrSellerDataConfig(); echo $array[$_SESSION['show']['per_diem']];?>
			</div>
			
			<div class="clrboth"></div>
			
			<div class="column grid_2">Light & Sound:</div>
			<div class="column grid_4">
				<?php $array = coBuyerOrSellerDataConfig(); echo $array[$_SESSION['show']['light_n_sound']];?>
			</div>
			
			<div class="clrboth"></div>
			
			<div class="column grid_2">Rider Requirement:</div>
			<div class="column grid_4">
				<?php $array = coBuyerOrSellerDataConfig(); echo $array[$_SESSION['show']['rider_req']];?>
			</div>
			
			<div class="clrboth"></div>
			
			<div class="column grid_2">VISA & Work Permits:</div>
			<div class="column grid_4">
				<?php $array = coBuyerOrSellerDataConfig(); echo $array[$_SESSION['show']['visa_n_work_permits']];?>
			</div>
			
			<div class="clrboth"></div>
			
			<div class="column grid_2">Additional Information:</div>
			<div class="column grid_6">
				<?php echo $_SESSION['show']['additional'];?>
			</div>
			
			<div class="clrboth"></div>
			
			<div class="column grid_2">Upload tech rider:</div>
			<div class="column grid_4">
				<a href="<?php echo fileTarget($USER->getId(),$_SESSION['show']['tech_rider']);?>" target="_blank"><?php echo $_SESSION['show']['tech_rider'];?></a>
			</div>
			
			<div class="clrboth"></div>
			
			<div class="column grid_2">Upload show images:</div>
			<div class="column grid_6">
				<?php if($_SESSION['show']['show_image_1']):?>
					<a href="<?php echo fileTarget($USER->getId(),$_SESSION['show']['show_image_1']);?>" target="_blank">
						<img src="<?php echo thumb(fileTarget($USER->getId(),$_SESSION['show']['show_image_1']),150,150);?>" /> 
					</a>
					&nbsp;&nbsp;&nbsp;
				<?php endif; ?>
				<?php if($_SESSION['show']['show_image_2']):?>
					<a href="<?php echo fileTarget($USER->getId(),$_SESSION['show']['show_image_2']);?>" target="_blank">
						<img src="<?php echo thumb(fileTarget($USER->getId(),$_SESSION['show']['show_image_2']),150,150);?>" />
					</a>		
					&nbsp;&nbsp;&nbsp;
				<?php endif; ?>
				<?php if($_SESSION['show']['show_image_3']):?>
					<a href="<?php echo fileTarget($USER->getId(),$_SESSION['show']['show_image_3']);?>" target="_blank">
						<img src="<?php echo thumb(fileTarget($USER->getId(),$_SESSION['show']['show_image_3']),150,150);?>" /> 
					</a>	
					&nbsp;&nbsp;&nbsp;
				<?php endif; ?>
			</div>
			
			<div class="clrboth"></div>
			
			<div class="column grid_2">Upload hospitality rider:</div>
			<div class="column grid_4">
				<?php if($_SESSION['show']['hospitality_rider']): ?>
					<a href="<?php echo fileTarget($USER->getId(),$_SESSION['show']['hospitality_rider']);?>" target="_blank"><?php echo $_SESSION['show']['hospitality_rider'];?></a>
				<?php endif; ?>
			</div>
			
			<div class="clrboth"></div>
			
			<div style="width:0px;height:20px;"></div>
			
			<div class="column grid_2">
				&nbsp;
			</div>
			<div class="column grid_6">
				<div id="targetBack" class="red"></div>
				<div class="clrboth"></div>
				<input type="button"  id="button_submit_show" name="button_submit_show" value="Populate show" class="ui-corner-all button-yellow" />
				&nbsp;&nbsp;&nbsp;
				<?php echo loader_image(" class='hidden' id='loader' ");?>
			</div>
		
			<div class="clrboth"></div>
		</div>
	</div>
	
</div>
<div class="clrboth"></div>

<script type="text/javascript">
	$(function() {
		$('#button_submit_show').live('click',function(){
			$.post(BASE_URI+'seller/add_show/save_show',{},function(res){
				window.location = BASE_URI+'seller/add_show/add_notify';
			});
		});
	});
	
</script>